# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=postgresql-url_encode
_pkgname=url_encode
pkgver=1.2.4_pre20170817
_gitrev=0d9eeffb07c101e47e9ecd65ea271dc4ebef12ef
pkgrel=2
pkgdesc="url_encode, url_decode functions for PostgreSQL"
url="https://github.com/okbob/url_encode"
arch="all"
license="PostgreSQL"
makedepends="postgresql-dev"
source="https://github.com/okbob/url_encode/archive/$_gitrev/$pkgname-$_gitrev.tar.gz"
builddir="$srcdir/$_pkgname-$_gitrev"
options="!check"  # XXX: tests require running PostgreSQL

build() {
	make USE_PGXS=1
}

package() {
	depends="postgresql$(pg_config --major-version)"

	make install USE_PGXS=1 DESTDIR="$pkgdir"
}

sha512sums="d629932216924db6504998e49b812021a87e23c96f5cfc255bae6485021a9cf93759a4f4985537ea76fcc9e29e3da9b0c8ad949f878b165393cd12b7a90467c2  postgresql-url_encode-0d9eeffb07c101e47e9ecd65ea271dc4ebef12ef.tar.gz"
